home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AmigActive 10
/
AACD 10.iso
/
AACD
/
Magazine
/
Online
/
httpproxy
/
src
/
queue.h
< prev
next >
Wrap
C/C++ Source or Header
|
1996-08-20
|
1KB
|
64 lines
/*(( "Header" */
/*
* $Id: queue.h,v 1.1 1996/07/30 13:57:03 mshopf Exp mshopf $
*
* (c) 1995-96 Matthias Hopf
*
* Queueing for HttpProxy.
*
*/
/*
* $Log: queue.h,v $
* Revision 1.1 1996/07/30 13:57:03 mshopf
* Initial revision
*
*
*/
/*)) */
#ifndef _QUEUE_H__
#define _QUEUE_H__
/*(( "Constants" */
#define QUEUEFILE "@queue" /* File name for queue files */
#define MAX_QUEUE_NUM 64 /* Maximum total queue length (number of entries) */
#define MAX_QUEUE_LEN 128 /* Maximum size of Urls to be queued */
/*)) */
/*(( "Types" */
typedef struct {
char Url [MAX_QUEUE_LEN];
} queue_t;
/*)) */
/*(( "Prototypes" */
/* Initialization routine. Get queueing information. */
/* return 0 on major failure */
int QueueInit (void);
/* Clean up and save new queueing information file. */
void QueueExit (void);
/* Check whether a specific Url is already queued. Returns NULL when not queued. */
queue_t *QueueCheck (const char *Url);
/* Queue a Url. Returns 0 on failure */
int QueueQueue (const char *Url);
/* Unqueue a Url */
void QueueUnqueue (queue_t *Queue);
/* Get the next queued Url. Start with Last==NULL. Returns NULL when no more Urls are queued. */
queue_t *QueueNext (const queue_t *Last);
/*)) */
#endif /* _QUEUE_H__ */